<template>
  <div>
    <div>
      <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        active-text-color="#20A0FF"
        router
      >
          <!-- <el-menu-item index="1" @click="changeNav(1)">今日预约</el-menu-item>
          <el-menu-item index="2" @click="changeNav(2)">预约报备</el-menu-item> -->
          <el-menu-item index="/home/reservation/today">今日预约</el-menu-item>
          <el-menu-item index="/home/reservation/appointreport">预约报备</el-menu-item>
      </el-menu>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "project",
  data() {
    return {
      activeIndex: "/home/reservation/today",
    };
  },
  methods: {
    changeNav(index) {
      switch (index) {
        case 1:
          this.$router.push("/home/reservation/today");
          break;
        case 2:
          this.$router.push("/home/reservation/appointreport");
          break;
        default:
          this.$router.push("/home/reservation/appointreport");
      }
    },
  },
};
</script>

<style lang='less' rel='stylesheet/less' scoped>
</style>
